package com.minutes.in.seconds.ui.screens;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.TextView;

import com.minutes.in.seconds.R;
import com.minutes.in.seconds.ui.event.AddMeetingEventHandler;

public class AddMeetingActivity extends Fragment {

	private EditText mMeetingTitle;
	
	private EditText mStartDate;
	
	private EditText mStartTime;
	
	private EditText mEndTime;
	
	private EditText mComment;
	
	private TextView mSpeakerCount;
	
	private TextView mAttendeeCount;
	
	private View mAddMeeting;
	
	private View mAddSpeakers;
	
	private View mAddAttendees;
	
	private View mAddVoiceNote;
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.activity_add_meeting,
		        container, false);
		
		mMeetingTitle = (EditText) view.findViewById(R.id.edtMeetingTitle);
		mStartDate = (EditText) view.findViewById(R.id.edtStartDate);
		mStartTime = (EditText) view.findViewById(R.id.edtStartTime);
		mEndTime = (EditText) view.findViewById(R.id.edtEndTime);
		mComment = (EditText) view.findViewById(R.id.edtComment);
		mAddMeeting = view.findViewById(R.id.btnAddMeeting);
		mAddSpeakers = view.findViewById(R.id.layoutAddSpeaker);
		mAddAttendees = view.findViewById(R.id.layoutAddAttendee);
		mAddVoiceNote = view.findViewById(R.id.layoutAddVoiceNote);
		mSpeakerCount = (TextView) view.findViewById(R.id.txtSpeakerCount);
		mAttendeeCount = (TextView) view.findViewById(R.id.txtAttendeeCount);
        
		AddMeetingEventHandler eventHandler = new AddMeetingEventHandler(this);
		mStartDate.setOnClickListener(eventHandler);
		mStartTime.setOnClickListener(eventHandler);
		mEndTime.setOnClickListener(eventHandler);
		mAddMeeting.setOnClickListener(eventHandler);
		mAddSpeakers.setOnClickListener(eventHandler);
		mAddAttendees.setOnClickListener(eventHandler);
		mAddVoiceNote.setOnClickListener(eventHandler);
        
        return view;
	}

	public EditText getMeetingTitle() {
		return mMeetingTitle;
	}

	public EditText getStartDate() {
		return mStartDate;
	}

	public EditText getStartTime() {
		return mStartTime;
	}

	public EditText getEndTime() {
		return mEndTime;
	}

	public EditText getComment() {
		return mComment;
	}

	public View getAddMeeting() {
		return mAddMeeting;
	}

	public View getAddSpeakers() {
		return mAddSpeakers;
	}

	public View getAddAttendees() {
		return mAddAttendees;
	}

	public View getAddVoiceNote() {
		return mAddVoiceNote;
	}

	public TextView getSpeakerCount() {
		return mSpeakerCount;
	}

	public TextView getAttendeeCount() {
		return mAttendeeCount;
	}
	
}
